package j.framework.tags.easyui;

import javax.servlet.jsp.JspException;
import java.util.Map;

/**
 * easyui之日期时间控件
 * Created by junhai on 2015/1/17.
 */
public class DateTimeTag extends DateTag {

    private Boolean showSeconds;//是否显示秒

    @Override
    public void writeEasyuiDataOptions(Map<String, Object> dataOptions) throws JspException {
        super.writeEasyuiDataOptions(dataOptions);
        if(null!=showSeconds && !showSeconds){
            dataOptions.put("showSeconds",showSeconds);
        }
    }

    @Override
    public String getEasyuiClassName() {
        return "easyui-datetimebox";
    }

    public void setShowSeconds(Boolean showSeconds) {
        this.showSeconds = showSeconds;
    }
}
